package com.gong.DesignPattern.InterpreterPattern;

/**
 * @author GongChang
 * @version 1.0
 * @date 2021/7/4 0004 9:52
 */
public class TerminalExpression implements Expression {
    private String data;

    public TerminalExpression(String data){
        this.data = data;
    }

    @Override
    public boolean interpret(String context) {
        if (context.contains(data)){
            return true;
        }

        return false;
    }
}
